.class public Lcom/glympse/android/glympse/ViewSendGlympse$OnContactPickerClicked;
.super Ljava/lang/Object;
.source "ViewSendGlympse.java"

# interfaces
.implements Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewSendGlympse;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "OnContactPickerClicked"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympse/ViewSendGlympse;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/ViewSendGlympse;)V
    .locals 0
    .parameter

    .prologue
    .line 1091
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnContactPickerClicked;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public OnContactPicked(Lcom/glympse/android/glympse/DlgContactPicker$Person;Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;)V
    .locals 6
    .parameter "oPerson"
    .parameter "oContactInfo"

    .prologue
    const/4 v5, 0x5

    const/4 v4, 0x4

    .line 1096
    iget v2, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_eRecipientType:I

    if-ne v4, v2, :cond_1

    .line 1098
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnContactPickerClicked;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    new-instance v3, Lcom/glympse/platform/common/Recipient;

    invoke-direct {v3, v4}, Lcom/glympse/platform/common/Recipient;-><init>(I)V

    invoke-virtual {v2, v3}, Lcom/glympse/android/glympse/ViewSendGlympse;->AddRecipient(Lcom/glympse/platform/common/Recipient;)V

    .line 1128
    :cond_0
    :goto_0
    return-void

    .line 1100
    :cond_1
    iget v2, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_eRecipientType:I

    if-ne v5, v2, :cond_2

    .line 1102
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnContactPickerClicked;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    new-instance v3, Lcom/glympse/platform/common/Recipient;

    invoke-direct {v3, v5}, Lcom/glympse/platform/common/Recipient;-><init>(I)V

    invoke-virtual {v2, v3}, Lcom/glympse/android/glympse/ViewSendGlympse;->AddRecipient(Lcom/glympse/platform/common/Recipient;)V

    goto :goto_0

    .line 1104
    :cond_2
    iget-object v2, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_strData:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    .line 1107
    iget-object v2, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_strData:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Recipient;->GuessType(Ljava/lang/String;)I

    move-result v0

    .line 1108
    .local v0, eRecipientType:I
    if-eqz v0, :cond_5

    .line 1111
    iget-object v1, p1, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    .line 1112
    .local v1, strName:Ljava/lang/String;
    invoke-static {v1}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_3

    iget-object v2, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_strLabel:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_3

    .line 1114
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, " ("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_strLabel:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ")"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 1118
    :cond_3
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnContactPickerClicked;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    new-instance v3, Lcom/glympse/platform/common/Recipient;

    iget-object v4, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_strData:Ljava/lang/String;

    invoke-static {v1}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_4

    const/4 v5, 0x0

    :goto_1
    invoke-direct {v3, v4, v0, v5}, Lcom/glympse/platform/common/Recipient;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    invoke-virtual {v2, v3}, Lcom/glympse/android/glympse/ViewSendGlympse;->AddRecipient(Lcom/glympse/platform/common/Recipient;)V

    goto :goto_0

    :cond_4
    move-object v5, v1

    goto :goto_1

    .line 1125
    .end local v1           #strName:Ljava/lang/String;
    :cond_5
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnContactPickerClicked;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-static {v2}, Lcom/glympse/android/glympse/ViewSendGlympse;->access$3(Lcom/glympse/android/glympse/ViewSendGlympse;)Landroid/widget/AutoCompleteTextView;

    move-result-object v2

    iget-object v3, p2, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_strData:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/AutoCompleteTextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method
